package com.scenic.map.service;

import org.springframework.stereotype.Service;
import java.util.*;

@Service
public class SpotService {
    // 实际应从数据库查，这里举例
    public List<Map<String, Object>> getSpotsByCity(String city) {
        List<Map<String, Object>> spots = new ArrayList<>();
        if ("杭州".equals(city)) {
            Map<String, Object> spot = new HashMap<>();
            spot.put("name", "西湖");
            spot.put("address", "杭州市西湖区");
            spot.put("location", "120.15507,30.27415");
            spots.add(spot);
            // 可添加更多景点
        }
        System.out.println(spots.get(0));
        return spots;
    }
} 